package com.javaGame.role;

import java.awt.*;

/**
 * 道具类
 */
public class Prop extends BaseRole {
    /**道具图片*/
    public static Image[] propImg;
    /**道具类*/
    private int type;
    /**火力道具常量*/
    public static final int FIRE = 0;
    /**炸弹道具常量*/
    public static final int BOMB = 1;
    /**加人道具常量*/
    public static final int ADDLIFE = 2;

    public Prop(int x, int y,int type) {
        super(x, y, 60, 35);
        this.type = type;

        if(type == FIRE){
            this.currentImg = propImg[0];
        }
        else  if(type == BOMB){
            this.currentImg = propImg[1];
        }
        else if(type == ADDLIFE){
            this.currentImg = propImg[2];
        }
    }

    public int getType() {
        return type;
    }

    @Override
    public void move() {
        this.x -= 2;
    }
}
